import request from '@/utils/request'
/**
 * @description 查询企业的部门列表
 * @returns
 */
export const getdepartment = () => request({
  url: '/company/department'
})
/**
 * @description 获取员工简单列表
 * @returns
 */
export const getEmployessAPI = () => request({
  url: '/sys/user/simple'
})
/**
 * @description 添加子部门
 * @param {*} data 对象
 * @returns
 */
export const addDepartmentAPI = (data) => request({
  url: '/company/department',
  method: 'POST',
  data
})
/**
 * @description 根据ID修改部门详情
 * @param {*} id 部门id
 * @returns
 */
export const addDepartDetail = (id) => request({
  url: '/company/department/' + id
})
/**
 * @description 根据ID修改部门详情
 * @param {*} id
 * @returns
 */
export const editDepartDetail = (data) => request({
  url: '/company/department/' + data.id,
  method: 'PUT',
  data
})
/**
 * @description 根据ID删除部门
 *  @param {*} id 部门id
 * @returns
 */
export const delDepartDetail = (id) => request({
  url: '/company/department/' + id,
  method: 'DELETE'

})

